package com.ftg.learn.springboot.contact.mapper;

import com.ftg.learn.springboot.contact.pojo.opinion;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface opinionMapper {

	@Insert("insert into contact(conid,conname,conemail,conphone,conhelp) values(#{conid},#{conname},#{conemail},#{conphone},#{conhelp})")
	int addController(opinion opinion);

	@Select("SELECT * FROM contact where conname=#{conname}")
	List<opinion> showall(String conname);
}
